package com.example.dw.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 题库实体类
 * @author system
 * @since 2024-01-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("questionbank")
public class QuestionBank implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 题目ID
     */
    @TableId(value = "question_id", type = IdType.AUTO)
    private Integer questionId;

    /**
     * 题目类型 (1-单选题 2-多选题 3-判断题 4-填空题 5-问答题)
     */
    @TableField("question_type")
    private Integer questionType;

    /**
     * 题目内容
     */
    @TableField("question_text")
    private String questionText;

    /**
     * 选项（JSON格式）
     */
    @TableField("options")
    private String options;

    /**
     * 答案
     */
    @TableField("answer")
    private String answer;

    /**
     * 难度等级
     */
    @TableField("difficulty")
    private String difficulty;

    /**
     * 图片URL
     */
    @TableField("image_url")
    private String imageUrl;

    /**
     * 视频URL
     */
    @TableField("video_url")
    private String videoUrl;

    /**
     * 音频URL
     */
    @TableField("audio_url")
    private String audioUrl;

    /**
     * 章节ID
     */
    @TableField("chapter_id")
    private Integer chapterId;

    /**
     * 解析说明
     */
    @TableField("explanation")
    private String explanation;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private LocalDateTime createdAt;

    /**
     * 更新时间
     */
    @TableField("updated_at")
    private LocalDateTime updatedAt;

    /**
     * 创建者ID
     */
    @TableField("created_by")
    private Integer createdBy;

    /**
     * 正确答案
     */
    @TableField("correct_answer")
    private String correctAnswer;

    /**
     * 课程ID
     */
    @TableField("courseid")
    private Integer courseid;

    /**
     * 成功次数
     */
    @TableField("success")
    private Integer success;

    /**
     * 分值
     */
    @TableField("score")
    private Integer score;

    /**
     * 课程类型ID
     */
    @TableField("courseTypeid")
    private Integer courseTypeid;
} 